package com.insta.formation.calendar.dao;

import com.insta.formation.calendar.model.Calendar;
import com.insta.formation.calendar.model.Event;
import com.insta.formation.calendar.model.Person;

public interface ICalendarDao extends IGenericDao<Calendar, Integer>
{
	public Calendar findByName(String name);
	
	/**
	 * 	Read a event in the calendar
	 * 
	 * @param calendarName - name of the calendar
	 * @param eventName - name of the vent
	 * @return
	 */
	public Event readEvent(String calendarName, String eventName);
	
	/**
	 * Update a event
	 * 
	 * @param calendar
	 * @param event
	 */
	public void updateEvent(Event event);
	
	/**
	 * 	Delete a event of the calendar
	 * 
	 * @param calendar
	 * @param event
	 */
	public void deleteEvent(Calendar calendar, Event event);
	
	/**
	 * 	Delete a guest of the event
	 */
	public void deleteGuestEvent(Event event, Person guest);
}
